import random,string

cardpatterns = ['diamond ', 'plum ', 'heart ', 'spade ']
cardnum = [str(x) for x in range(1,14)]
joker = ['redjoker', 'blackjoker']
cardlist =  []

player1 = []
player2 = []
player3 = []
rest = []
for i in cardpatterns:
    for j in cardnum:
        card = '%s%s' %(i,j)
        cardlist.append(card)
cardlist += joker
print cardlist

random.shuffle(cardlist)
for x in range(0,51,3):
    player1.append(cardlist[x])
    player2.append(cardlist[x+1])
    player3.append(cardlist[x+2])
rest = cardlist[-3:]
print player1,player2,player3,rest